<div class="panel panel-default" ng-controller="BusPriceScheduleListCtrl">
	<div class="panel-heading">
		跨城巴士 / 班次档案 / 价格计划列表 <span class="text-danger text-center" ng-if="tpl">(班次号：{{tpl.shiftNo}}，批次号：{{tpl.batchNo}})</span>
	</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="typeList.selected" theme="bootstrap">
							<ui-select-match placeholder="折扣类型">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="type in typeList | propsFilter: {name: $select.search}">
								<span ng-bind-html=" type.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="typeList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-4">
				<div class="col-md-11">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width:10px;"></th>
					<th style="width:80px;">折扣类型</th>
					<th style="width:70px;">基础票价</th>
					<th style="width:70px;">最低票价</th>
					<th style="width:70px;">折扣参数</th>
					<th style="width:100px;">开始日期</th>
					<th style="width:100px;">结束日期</th>
					<th style="width:100px;">
						<div class="list-icon">
							<a href tooltip="添加计划">
								<i class="fa fa-plus" ng-click="write('lg',null,'insert')"></i>
							</a>
						</div>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="schedule in dataList">
					<td></td>
					<td>
						<span ng-if="schedule.type==0">无折扣</span>
						<span ng-if="schedule.type==1">等额递减</span>
						<span ng-if="schedule.type==2">等差递减</span>
					</td>
					<td>{{schedule.price | number:2}}</td>
					<td>{{schedule.lowest | number:2}}</td>
					<td>{{schedule.parameter | number:2}}</td>
					<td>{{schedule.availFrom | date : 'yyyy-MM-dd'}}</td>
					<td>{{schedule.availTo | date : 'yyyy-MM-dd'}}</td>
					<td>
						<div class="list-icon">
							<a href tooltip="修改计划">
								<i class="fa fa-pencil" ng-click="write('lg',schedule,'update')"></i>
							</a>
							<a href tooltip="删除计划" >
								<i class="fa fa-times" ng-click="del('sm',schedule,'delete')"></i>
							</a>
						</div>
					</td>
				</tr>
				<tr ng-show="dataList.length==0">
					<td colspan="8" style="text-align: center;">暂无价格计划信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>